package com.hudongwx.food.activity;

import android.app.AlertDialog;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.hudongwx.food.R;

/**
 * 更多
 */
public class MoreActivity extends AppCompatActivity {
private LinearLayout l1,l2,l3,l4,l5;
    private ImageView img;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_more);
        l1 = (LinearLayout) findViewById(R.id.kefuzhongxin);
        l2 = (LinearLayout) findViewById(R.id.guanyuwomen);
        l3 = (LinearLayout) findViewById(R.id.banbenxinxi);
        l4 = (LinearLayout) findViewById(R.id.woyaotucao);
        l5 = (LinearLayout) findViewById(R.id.zhiciwomen);
        img = (ImageView) findViewById(R.id.gengduo_img);
        img.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        l1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(MoreActivity.this,KeFuZhongXinActivity.class);
                MoreActivity.this.startActivity(intent);
            }
        });
        l2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(MoreActivity.this,GuanYunWoMenActivity.class);
                MoreActivity.this.startActivity(intent);
            }
        });
        l3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(MoreActivity.this,BanBenXingXiActivity.class);
                MoreActivity.this.startActivity(intent);
            }
        });
        l4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(MoreActivity.this,LoginActivity.class);
                MoreActivity.this.startActivity(intent);
            }
        });
        l5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Uri uri = Uri.parse("http://www.shiandianping.com");
                Intent intent = new Intent(Intent.ACTION_VIEW, uri);
                startActivity(intent);
//                AlertDialog.Builder builder = new AlertDialog.Builder(MoreActivity.this);
//                builder.setTitle("还没做好");
//                builder.show();
            }
        });
    }
}
